import request from '@/utils/request'

// 查询管理列表
export function listAgentManage(query) {
  return request({
    url: '/agent/agentManage/list',
    method: 'get',
    params: query
  })
}

// 查询管理详细
export function getAgentManage(id) {
  return request({
    url: '/agent/agentManage/' + id,
    method: 'get'
  })
}

// 新增管理
export function addAgentManage(data) {
  return request({
    url: '/agent/agentManage',
    method: 'post',
    data: data
  })
}

// 修改管理
export function updateAgentManage(data) {
  return request({
    url: '/agent/agentManage',
    method: 'put',
    data: data
  })
}

// 删除管理
export function delAgentManage(id) {
  return request({
    url: '/agent/agentManage/' + id,
    method: 'delete'
  })
}

// 价格接口配置 新增
export function addInterfacePrice(data) {
  return request({
    url: '/agent/agentManage/addInterfacePrice',
    method: 'post',
    data: data
  })
}

// 价格接口配置 修改
export function resetInterfacePrice(data) {
  return request({
    url: '/agent/agentManage/resetInterfacePrice',
    method: 'post',
    data: data
  })
}

// 状态开关
export function resetStatus(data) {
  return request({
    url: '/agent/agentManage/resetStatus',
    method: 'post',
    data: data
  })
}

// 功能权限配置页查询
export function listAgentAuthorized(query) {
  return request({
    url: '/agent/agentManage/listAgentAuthorized/' + query,
    method: 'post'
  })
}
